Strict

Import agfx

Global myTmpScreen:TTmpScreen

Class TAgfx_test_app Extends TFramework

	Method OnCreate:Int()
		
		Super.OnCreate()
				
		myTmpScreen = New TTmpScreen		
		myTmpScreen.Prepare()
		
		Return 0
	End
	
End


Class TTmpScreen Extends TScreen
	
	Field slider:TGUISlider
	' START when app is created
	Method Start:Void()
		
		IMAGES.Load("slider_left.png", "SLIDER_LEFT", True)	
		IMAGES.Load("slider_middle.png", "SLIDER_MIDDLE", True)	
		IMAGES.Load("slider_right.png", "SLIDER_RIGHT", True)	
		IMAGES.Load("slider_button.png", "SLIDER_BUTTON", True)	

		Self.slider = New TGUISlider("Slider","SLIDER_LEFT","SLIDER_MIDDLE","SLIDER_RIGHT","SLIDER_BUTTON",32,64,256,8,-1,1,0)

	End
	
	' main app logic loop update
	Method Update:Void()
		Self.slider.Update()
	End
	
	' main app render loop
	Method Render:Void()
		Cls		
		Self.slider.Render()
	End
End
